package com.company.project.upm.controller.common;

import com.base.common.model.dto.EnumDto;
import com.base.common.model.dto.ListBaseDto;
import com.base.springboot.starter.web.controller.BaseController;
import com.company.project.upm.common.enums.SexEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description 枚举数据控制器
 * @Author zhongbo.yu
 * @Date 2021/12/28
 */
@Api(value = "监控检查控制器")
@RestController
@RequestMapping("enumData")
public class EnumDataController extends BaseController {

    @GetMapping("getSexEnum")
    @ApiOperation(value = "获取性别枚举")
    public ListBaseDto<EnumDto> getSexEnum() {
        ListBaseDto<EnumDto> listBaseDto = new ListBaseDto<>();
        List<EnumDto> list = SexEnum.getList();
        listBaseDto.setResult(list);
        return listBaseDto;
    }

}